package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.TypegoodsMapper;
import chuishop.yiqimaicai.pojo.Typegoods;
import chuishop.yiqimaicai.service.TypegoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypegoodsServiceImpl implements TypegoodsService {

    @Autowired
    private TypegoodsMapper typegoodsMapper;

    @Override
    public List<Typegoods> findAllTypegoods() {
        return typegoodsMapper.findAllTypegoods();
    }

    @Override
    public boolean addTypegoods(Typegoods typegoods) {
        if(typegoodsMapper.addTypegoods(typegoods)>0){
            return true;
        }

        return false;
    }

    @Override
    public boolean delTypegoods(String[] ids) {
        if(typegoodsMapper.delTypegoods(ids)>0){
            return true;
        }
        return false;
    }
}
